<template>
  <div :class="Toggle == '1' ? 'age-body' : 'age-Editor'">
    <div class="person-body" v-if="Toggle == '1'">
      <div class="append">
        <i class="el-icon-circle-plus" @click="handelClick"></i
        ><span>添加证书</span>
      </div>
      <div class="content">
        <div class="content-btm">
          <span>PMP证书</span>
          <p>未认证</p>
          <div @click="handelClick">
            <i class="el-icon-edit-outline"></i> 编辑
          </div>
        </div>
        <div class="content-btm">
          <span>PMP证书</span>
          <p>未认证</p>
          <div @click="handelClick">
            <i class="el-icon-edit-outline"></i> 编辑
          </div>
        </div>
      </div>
    </div>
    <div class="Editor-body" v-if="Toggle == '2'">
      <p class="title">证书 <i class="el-icon-delete"></i></p>
      <div class="body">
        <div class="body-left">
          <div><span style="color: red">*</span>证书名称</div>
          <div>证书编号：</div>
        </div>

        <div class="body-cen">
          <p>
            <el-input v-model="input" placeholder=""></el-input>
          </p>

          <p><el-input v-model="input" placeholder=""></el-input></p>
        </div>
      </div>
      <div class="bottom">
        <p @click="handelOff(2)">取消</p>
        <p @click="handelOff(1)">确认</p>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  data() {
    return {
      Toggle: "1",

      value1: "", // 生日
      input: "",
    };
  },
  components: {},
  methods: {
    handelClick() {
      this.Toggle = "2";
    },
    // 编辑 性别切换
    handelEle(num) {
      this.ele = num;
    },
    // 切换身份
    handelSelect(num) {
      this.select = num;
    },
    // 取消/确认
    handelOff(num) {
      if (num == 1) {
        this.Toggle = "1";
      } else {
        this.Toggle = "1";
      }
    },
  },
};
</script>

<style scoped lang="less">
.age-body {
  width: 100%;
  height: 100%;
  display: flex;
  .person-body {
    width: 100%;
    margin: 0 auto;
    margin-top: 15px;
    margin-bottom: 20px;
    font-size: 14px;
    // 添加
    .append {
      width: 100%;
      height: 20px;
      line-height: 20px;
      display: flex;
      justify-content: flex-end;
      vertical-align: middle;
      i {
        font-size: 20px;
        vertical-align: middle;
      }
    }
    // 内容
    .content {
      width: 100%;
      margin-top: 10px;
      .content-btm {
        width: 100%;
        display: flex;
        height: 30px;
        line-height: 30px;
        position: relative;
        p{
            width: 60px;
            height:25px;
            text-align: center;
            line-height: 25px;
            background-color: #F2F2F3;
            border: 1px solid gray;
            border-radius: 5px;
            color: #A6A8AD;
            margin-left: 50px;
        }
        div {
          position: absolute;
          right: 0;
        }
        i {
          font-size: 21px;
          vertical-align: middle;
        }
        span {
          margin-left: 30px;
        }
        span:nth-child(1) {
          margin-left: 0px;
        }
      }
    }
  }
}
/deep/.el-input__inner {
  height: 30px !important;
  font-size: 14px;
}
// 编辑
.age-Editor {
  width: 100%;
  height: 100%;
  display: flex;
  background-color: #f8f8f8;
  .Editor-body {
    width: 94%;
    margin: 0 auto;
    margin-top: 15px;
    margin-bottom: 20px;
    font-size: 14px;
    .title {
      height: 30px;
      line-height: 30px;
      font-size: 15px;
      font-weight: 600;
      position: relative;
      i {
        position: absolute;
        font-size: 20px;
        right: 0;
      }
    }
    .body {
      width: 100%;
      display: flex;
      margin-top: 20px;
      position: relative;
      .body-left {
        width: 18%;
        div {
          height: 35px;
          line-height: 35px;
          margin-top: 10px;
        }
      }
      .body-cen {
        width: 30%;
        p {
          height: 35px;
          line-height: 35px;
          margin-top: 10px;
          span {
            color: #3894ff;
          }
        }
      }
      .body-right {
        position: absolute;
        right: 0;
        width: 20%;
        .img-avatar {
          width: 120px;
          height: 120px;
          border: 1px solid gold;
          border-radius: 50%;
        }
      }
    }
    .bottom {
      width: 100%;
      height: 35px;
      display: flex;
      justify-content: flex-end;
      p {
        width: 80px;
        height: 35px;
        background-color: #3894ff;
        border-radius: 5px;
        line-height: 35px;
        text-align: center;
        color: #ffffff;
      }
      p:nth-child(1) {
        background-color: #919191;
        margin-right: 20px;
      }
    }
  }
}
</style>
